/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.sys.dao;

import com.thinkgem.jeesite.common.persistence.CrudDao;
import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
import com.thinkgem.jeesite.modules.sys.entity.*;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 库存管理DAO接口
 *
 * @author huoyan403
 * @version 2016-11-09
 */
@MyBatisDao
public interface TbShopProductDao extends CrudDao<TbShopProduct> {

    void updateStatus(TbShopProduct tbShopProduct);

    void insertPro(TbShopProduct tbShopProduct);

    TbShopProduct selectProByProId(TbShopProduct tbShopProduct);

    Map<String, Object> selectProductByBarcodeAndColorAndUserId(@Param(value = "num") String num, @Param(value = "color") String color, @Param(value = "userId") String userId);

    void updateShopProduct(Map<String, Object> sqlMap);

    void insertShoppinOrderLog(TbOfflineShoppingOrderLog log);

    void insertShoppinOrderInfo(TbOfflineShoppingOrderInfo info);

    void insertMsgNotify(TbMsgNotify msg);

    List findAllProByShopId(String shopId);

    List<Map<String, Object>> selectProductByBarcodeAndUserId(@Param(value = "num") String num, @Param(value = "userId") String userId);

    List<ReverseProduct> selectReverseProductList(ReverseProduct reverseProduct);

    int updateOrderToAllreadayReverse(Map map);

    TbUser getTbUserByPhone(String phone);

    List<TbMpWalletStream> getMpWalletStreamTime(String uid);

    int insetMpWallet(TbUser tbUser);

    int insetTenementWallet(TbUser tbUser);

    int updateMpWallet(@Param(value = "uid") String uid, @Param(value = "amount") BigDecimal amount);

    int inserTenementStream(TbTenementWalletStream tbTenementWalletStream);

    //物业缴费记录
    int inserTenementHistory(TbTenementHistory tbTenementHistory);

    int updateProductPriceById(@Param(value = "id") Integer id,@Param(value = "price") String price);
}